<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>代理房源(经纪人)</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../../../taofang/plugins/bootstrap-3.3.7-dist/css/bootstrap.css">
    <link rel="stylesheet" href="../../../taofang/css/TenantCentre.css">
    <link rel="stylesheet" href="../../../taofang/css/home.css">
</head>
<body>
<script src="../../../taofang/plugins/jquery-3.4.1.js"></script>
<script src="../../../taofang/plugins/bootstrap-3.3.7-dist/js/bootstrap.js"></script>

<%@include file="topB.jsp"%>



<div class="col-md-9 zy3">
    <table class="table table-hover">
        <thead>
        <tr>
            <th>房源编号</th>
            <th>房东姓名</th>
            <th>房东电话</th>
            <th>租赁类型</th>
            <th>租赁状态</th>
            <th>租赁价格</th>
        </tr>
        </thead>
        <tbody id="tb">
        <c:forEach items="${houseList}" var="h" varStatus="loop">

            <tr>
                <td>${h.id}</td>
                <td>${landlordList[loop.count-1].name}</td>
                <td>${landlordList[loop.count-1].phone}</td>
                <td>${h.rentType}</td>
                <td name="state">${h.houseState}</td>
                <td>${h.rentMoney}</td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</div>


<%@include file="BottomB.jsp"%>

<script>
    $(function () {
        let state = document.getElementsByName("state");
        for (let i = 0; i <state.length ; i++) {
            if (state[i].innerText=="待出租"){
                state[i].style.color="#cc0000";
                state[i].style.fontWeight="bolder"
            }

        }


    })
</script>
</body>
</html>